<template>
  <div>
    <bread-crumb one="平台管理" two="渠道管理"></bread-crumb>

    <el-form :inline="true" :model="formData">
      <el-form-item label="渠道名：">
        <el-input v-model="formData.serverIp"></el-input>
      </el-form-item>

      <el-form-item>
        <el-button type="primary" icon="search" @click="handleSearch()">搜索</el-button>
        <el-button type="primary" icon="delete" @click="handleClear()">清空</el-button>
      </el-form-item>
    </el-form>

    <el-table v-loading.body="loading" :data="tableData" border>
      <el-table-column prop="org_name" label="机构名" align="center"></el-table-column>
      <el-table-column prop="channel_name" label="渠道名" align="center"></el-table-column>
      <el-table-column prop="channel_type" label="渠道类型" align="center"></el-table-column>
      <el-table-column prop="security_site" label="安全站点" align="center"></el-table-column>
      <el-table-column prop="channel_reg_code" label="认证模式" align="center"></el-table-column>
      <el-table-column prop="memo" label="备注" align="center"></el-table-column>
      <el-table-column label="操作" align="center" width="200">
        <template slot-scope="scope">
          <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
          <el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <Pagination />
  </div>
</template>

<script>
  import BreadCrumb from "@/components/BreadCrumb.vue";
  import {mixins} from "@/core";

  export default {
    components: {
      BreadCrumb,
    },
    mixins: [mixins],
    data () {
      return {
        formData: {
          channelName: ""
        },
        API: {
          query: "/gafe/channels"
        }
      }
    }
  }
</script>

<style scoped>
  .el-input, .el-select {
    width: 120px;
  }
</style>
